package com.javaee.wordtree.entity;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Description
 * @Author liuyang2004
 * @Date 2025/4/20 11:30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)  // 忽略null字段
public class DeepseekRequest {
    @JsonProperty("model")
    private String model;  // 例如 "deepseek-chat"

    @JsonProperty("messages")
    private List<Message> messages;

    @JsonProperty("temperature")
    private Double temperature;  // 可选，控制随机性

    @JsonProperty("max_tokens")
    private Integer maxTokens;   // 可选，响应最大token数

    @JsonProperty("stream")
    private Boolean stream;      // 可选，是否流式响应

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Message {
        @JsonProperty("role")
        private String role;  // "system", "user" 或 "assistant"

        @JsonProperty("content")
        private String content;
    }
}